<template>
  <van-card
      v-for="user in props.userList"
      :tag="user.gender===0?'男':'女'"
      :desc="user.profile"
      :title="user.username"
      :thumb="user.avatarUrl"
  >
    <template #tags>
      <van-tag plain type="danger" v-for="tag in user.tags" style="margin-top: 8px;margin-right: 8px">{{tag}}</van-tag>

    </template>
    <template #footer>
      <van-button size="mini" type="primary">发消息</van-button>
      <van-button size="mini">待定</van-button>
    </template>
  </van-card>
</template>
<script  setup lang="ts">
import {UserType} from "../models/user";

interface UserCardListProps {
  loading: boolean;
  userList: UserType[];
}

const props = withDefaults(defineProps<UserCardListProps>(), {
  loading: true,
  // @ts-ignore
  userList: [] as UserType[],
});

</script>

<style scoped>

</style>